﻿@page "/TiffTest"
@inject IJSRuntime jsRuntime

<h3>TiffTest</h3>

<img src="@ImageBase64String" />
<Button Text="DeleteDraw" OnClick="DeleteRectClick" />

<script src="./ImageHelp.js"></script>
@code {

    public string ImageBase64String = "";

    protected override async Task OnInitializedAsync()
    {

    }

    protected override async Task OnAfterRenderAsync(bool firstRender)
    {
        await jsRuntime.InvokeVoidAsync("import", "./ImageHelp.js");
        if (firstRender)
        {

        }
    }

    private async Task DeleteRectClick()
    {
        ImageBase64String = await jsRuntime.InvokeAsync<string>("dealImage", ImageBase64String, 800, 800, 0.6);
    }
}
